<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增【请填写功能名称】')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-course-add">
        <div class="form-group">
            <label class="col-sm-3 control-label">实验名称：</label>
            <div class="col-sm-8">
                <input name="experimentName" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">课程名称：</label>
            <div class="col-sm-8">
                <input name="courseName" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">实验开始时间：</label>
            <div class="col-sm-8">
                <div class="input-group date">
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    <input name="experimentStartTime" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">实验结束时间：</label>
            <div class="col-sm-8">
                <div class="input-group date">
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    <input name="experimentEndTime" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
                </div>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script type="text/javascript">
    var prefix = ctx + "course"
    $("#form-course-add").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/add", $('#form-course-add').serialize());
        }
    }

    $("input[name='experimentStartTime']").datetimepicker({
        format: "yyyy-mm-dd HH:mm:ss",
        autoclose: true
    });

    $("input[name='experimentEndTime']").datetimepicker({
        format: "yyyy-mm-dd HH:mm:ss",
        autoclose: true
    });
</script>
</body>
</html>